<extend name="Public:base" />
<!-- 网站标题 -->
<block name="title">分组管理页面</block>
<block name="appendheader">
	<!-- Validform_v5.3.2验证框架 -->
	<link rel="stylesheet" type="text/css" href="__PUBLIC__/Validform/css/Validform_v5.3.2.css"/>
	<script type="text/javascript" src="__PUBLIC__/Validform/js/Validform_v5.3.2_min.js"></script>
	
	<script type="text/javascript">
		$(function() {
			$("#WebMenu-2000").addClass('active');	//选中父菜单
			$("#WebMenu-3000").addClass('active');	//选中当前菜单
		});
	
		$(function() {
			var editor;
			var myform=$("#myform").Validform({
				tiptype:3,
				label:".label",
				showAllError:true,
				postonce:true,//开启二次提交防御
				ajaxPost:false,
				beforeSubmit:function(curform) {
					//在验证成功后，表单提交前执行的函数，curform参数是当前表单对象。
					lockScreen();
				},
				callback:function(data){
					$.Hidemsg();
				}
			});
			myform.addRule([{
				ele:"#name",
				datatype:"*1-100",
				ajaxurl:"__APP__?g=Admin&m=Groups_user&a=check_username",
		        nullmsg:"请输入用户名",
		        sucmsg:"该用户名可以使用"
			},
			{
				ele:"#real_name",
				datatype:"*1-100",
		        nullmsg:"请输入真实姓名"
			},
			{
				ele:"#pwd",
				datatype:"*1-20",
		        nullmsg:"请输入6~16位字符的密码！"
			},
			{
				ele:"#pwd1",
				datatype:"*",
				recheck:"pwd",
		        nullmsg:"请再输入一次密码",
		        errormsg:"您两次输入的密码不一致！"
			},
			{
				ele:"#phone",
				datatype:"*1-100",
				nullmsg:"请输入联系方式"
			}]);
		});
</script>
</block>
<!-- 当前位置 -->

<block name="breadcrumb">
    <div class="page-header pull-left">
        <div class="page-title">添加成员</div>
    </div>
    <ol class="breadcrumb page-breadcrumb pull-left">
        <li><i class="fa fa-home"></i>&nbsp;<a href="__APP__?g=Admin">首页</a>&nbsp;&nbsp;<i class="fa fa-angle-right"></i>&nbsp;&nbsp;</li>
        <li><a href="#">基础数据</a>&nbsp;&nbsp;<i class="fa fa-angle-right"></i>&nbsp;&nbsp;</li>
        <li class="active">分组管理</li>
    </ol>
</block>

<!-- 网页主内容区 -->
<block name="main_content">
	<div class="row">
		<div class="col-md-12">
			<div class="panel panel-blue">
				<div class="panel-heading">添加成员</div>
				<div class="panel-body pan">
					<form id="myform" name="myform" action="__APP__?g={:GROUP_NAME}&m={:MODULE_NAME}&a=insert" method="post" class="form-horizontal form-seperated">
						<div class="form-body">
							<div class="form-group">
								<label for="groupsid" class="col-md-2 control-label">分组编号<span class='require'>*</span></label>
								<div class="col-md-7"> 
									<input type="text" id="groupsid" name="groupsid" class="form-control" />
								</div>
							</div>
							<div class="form-group">
								<label for="name" class="col-md-2 control-label">用户名<span class='require'>*</span></label>
								<div class="col-md-7"> 
									<input type="text" id="name" name="name" class="form-control" />
								</div>
							</div>
							<div class="form-group">
								<label for="name" class="col-md-2 control-label">密码<span class='require'>*</span></label>
								<div class="col-md-7">
									<input type="password" id="pwd" name="pwd" class="form-control" />
								</div>
							</div>
							<div class="form-group">
								<label for="name" class="col-md-2 control-label">确认密码<span class='require'>*</span></label>
								<div class="col-md-7">
									<input type="password" id="pwd1" name="pwd1" class="form-control" />
								</div>
							</div>
							<div class="form-group">
								<label for="real_name" class="col-md-2 control-label">姓名<span class='require'>*</span></label>
								<div class="col-md-7">
									<input type="text" id="real_name" name="real_name" class="form-control" />
								</div>
							</div>
							<div class="form-group">
								<label for="gender" class="col-sm-2 control-label">性别</label>
								<div class="col-md-7">
									<div class="radio">
										<volist name="gender_list" id="vo">
											<label class="radio-inline"><input value="{$vo.id}" name="gender"  type="radio" <eq name="i" value="1">checked</eq> />&nbsp;{$vo.name}</label>
										</volist>
									</div>
								</div>
							</div>
							<div class="form-group">
								<label for="professional" class="col-md-2 control-label">职称 <span class='require'>*</span></label>
								<div style="display:inline" class="col-md-4">
									<select id="professional" name="professional" class="form-control" >
											<option value="">请选择</option>
											<volist name="professional_list" id="vo">
												<option value="{$vo.id}" <eq name="vo.id" value="$data.professional">selected</eq>>{$vo.name}</option>
											</volist>
									</select>
								</div>
							</div>
							<div class="form-group">
								<label for="duty" class="col-md-2 control-label">职务<span class='require'>*</span></label>
								<div class="col-md-7">
									<input type="text" id="duty" name="duty" class="form-control" />
								</div>
							</div>
							<div class="form-group">
								<label for="certificate_no" class="col-md-2 control-label">身份证号<span class='require'>*</span></label>
								<div class="col-md-7">
									<input type="text" id="certificate_no" name="certificate_no" class="form-control" />
								</div>
							</div>
							<div class="form-group">
								<label for="phone" class="col-md-2 control-label">联系电话<span class='require'>*</span></label>
								<div class="col-md-7">
									<input type="text" id="phone" name="phone" class="form-control" />
								</div>
							</div>
							<div class="form-group">
								<label for="email" class="col-md-2 control-label">电子邮件<span class='require'>*</span></label>
								<div class="col-md-7">
									<input type="text" id="email" name="email" class="form-control" />
								</div>
							</div>
						</div>
						<div class="form-actions text-left">
							<div class="col-md-offset-2 col-md-7">
								<button type="submit" class="btn btn-primary">提交</button>&nbsp;&nbsp;
								<button type="button" class="btn btn-green" onclick="history.go(-1);">取消</button>
							</div>
						</div>
					</form>
				</div>
			</div>
		</div>
	</div>
</block>
